<template>
	<view class="page">
		<view class="saoma" @tap="openSaoma">
			<view class="fixed_">
				<image src="../../static/icon/saoma.png" mode=""></image>
				<text>扫一扫</text>
			</view>
		</view>
		<view class="msgInfo">
			温馨提示：请扫描设施设备的二维码
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			openSaoma() {
				uni.scanCode({
					success: function(res) {
						console.log('条码类型：' + res.scanType);
						console.log('条码内容：' + res.result);
					}
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.msgInfo {
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #B6B6B6;
		line-height: 40rpx;
	}

	.page {
		padding: 30rpx;
	}

	.fixed_ {
		position: absolute;
		top: 50%;
		left: 50%;
		display: flex;
		align-items: center;
		transform: translate(-50%, -50%);
	}

	.saoma {
		width: 690rpx;
		height: 274rpx;
		background: #F8F9FF;
		border-radius: 20rpx;
		margin: 30rpx 0;
		position: relative;

		image {
			width: 44rpx;
			height: 44rpx;
			margin-right: 40rpx;
		}

		text {
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #4053CD;
			line-height: 44rpx;
		}
	}
</style>
